// package FilterPattern;

/**
 * Created by wanghongfu on 17/2/15.
 * email  1583505981@qq.com
 */
import java.util.List;
public class AndCriteria implements  Criteria {
 private Criteria  criteria;
 private Criteria  othercriteria;
 public AndCriteria(Criteria criteria,Criteria othercriteria){
 	this.criteria=criteria;
 	this.othercriteria=othercriteria;
 }
 
 public List<Person> meetCriterial(List<Person> person){
 	List<Person> firstCriteriaPersons=criteria.meetCriterial(person);
 	return othercriteria.meetCriterial(firstCriteriaPersons);
 }
}